package nc.ui.xew.workscategory;

import nc.ui.trade.business.HYPubBO_Client;
import nc.ui.trade.pub.IVOTreeDataByID;
import nc.uif.pub.exception.UifException;
import nc.vo.pub.SuperVO;
import nc.vo.xew.workscategory.WorksCategoryVO;


public class ClientTreeCardData implements IVOTreeDataByID{

	public String getIDFieldName() {
		return "pk_workscategory";
	}

	public String getParentIDFieldName() {
		return "pk_father";
	}

	public String getShowFieldName() {
		return "vcode,vname";
	}

	public SuperVO[] getTreeVO() {
		String whereSql = " isnull(dr,0)=0 order by vcode";
		SuperVO[] vos =  null;
		try {
			vos = HYPubBO_Client.queryByCondition(WorksCategoryVO.class, whereSql);
		} catch (UifException e) {
			e.printStackTrace();
			vos = null;
		}
		if(vos == null || vos.length ==0)
			return null;
		return vos;
	}

}
